import fetch from './fetch'

export default {
    VideoInfo,
    AppointVideo,
    CarouselVideo,
    MoreVideo,
    Cumulative,
    UploadBase64,
    GetUserOrder,
    GetSample,
    sales,
    salePaice
}
function VideoInfo(options){
    return fetch({
        method:'post',
        path:'/web-api/business/web/video/info/'+options.videoId,
        params:options
    });
}
//获取首页指定视频
function AppointVideo(options){
    return fetch({
        method:'post',
        path:'/web-api/business/web/index/appointVideo',
        params:options
    });
}
//获取轮播图视频
function CarouselVideo(options){
    return fetch({
        method:'post',
        path:'/web-api/business/web/index/recommendationVideo',
        params:options
    });
}
//获取首页更多视频
function MoreVideo(options){
    return fetch({
        method:'post',
        path:'/web-api/business/web/index/moreVideo',
        params:options
    });
}
// 获取商品累计下单金额
function Cumulative(options){
    return fetch({
        method:'get',
        path:'/web-api/app/statistics/pay/cumulative',
        params:options
    });
}
// 图片上传
function UploadBase64(options){
    return fetch({
        method:'post',
        path:'/web-api/infra/file/uploadBase64',
        params:options
    });
}
//判斷是否购买
function GetUserOrder(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/order/get-user-order',
        params:options
    });
}
//下载小样
function GetSample(options){
    return fetch({
        method:'get',
        path:'/web-api/business/file/download/getSample',
        params:options
    });
}
//获取用户最近交易记录
function sales(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/order/pages',
        params:options
    });
}

// 获得销售素材收入
function salePaice(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/order/salePaice',
        params:options
    });
}